<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="lib/html5shiv.js"></script>
	<script type="text/javascript" src="lib/respond.min.js"></script>
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="${basePath}/assets/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="${basePath}/assets/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="${basePath}/assets/lib/Hui-iconfont/1.0.8/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="${basePath}/assets/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="${basePath}/assets/h-ui.admin/css/style.css" />
	<!--[if IE 6]>
	<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script>
	<![endif]-->
	<title>首页</title>
	<style>
	#prat1{
		width: 48%;
		height: 100%;
		/* background: blue; */
		float: left;
	}
	
	#prat2{
		width: 48%;
		height: 100%;
		/* background: red; */
		float: left;
	}
	
	#prat3{
		width: 48%;
		height: 100%;
		/* background: yellow; */
		float: left;
		clear: left;
	}
	
	#prat4{
		width: 48%;
		height: 100%;
		/* background: green; */
		float: left;
	}
	
	</style>
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 数据管理 <span class="c-gray en">&gt;</span> 数据统计 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<!-- <div class="page-container">
		<div id="container" style="min-width:700px;height:400px"></div>
		
	</div> -->
	<div id="prat1"><div id="container1" style="min-width:700px;height:400px"></div></div>
	<div id="prat2"><div id="container2" style="min-width:700px;height:400px"></div></div>
	<div id="prat3"><div id="container3" style="min-width:700px;height:400px"></div></div>
	<div id="prat4"><div id="container4" style="min-width:700px;height:400px"></div></div>
	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="${basePath}/assets/lib/jquery/1.9.1/jquery.min.js"></script> 
	<script type="text/javascript" src="${basePath}/assets/lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src="${basePath}/assets/static/h-ui/js/H-ui.min.js"></script> 
	<script type="text/javascript" src="${basePath}/assets/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript" src="${basePath}/assets/lib/hcharts/Highcharts/5.0.6/js/highcharts.js"></script>
	<script type="text/javascript" src="${basePath}/assets/lib/hcharts/Highcharts/5.0.6/js/modules/exporting.js"></script>
	<script type="text/javascript" src="${basePath}/assets/lib/hcharts/Highcharts/5.0.6/js/highcharts-3d.js"></script>
	<script type="text/javascript">
/*  
    $.post("${basePath}/statistics/check", */
    		//定义一个Highcharts的变量，初始值为null
    		var oChart = null;
    		//定义oChart的布局环境
    		//布局环境组成：X轴、Y轴、数据显示、图标标题
    		var oOptions = {     
    		    //设置图表关联显示块和图形样式
    		    chart: {  
    		        renderTo: 'container1',  //设置显示的页面块
    		        //type:'line'                //设置显示的方式
    		        type: 'column'
    		    },  
    		    //图标标题
    		    title: {  
    		        //text: 'APP端和WEB端月登录统计'
    		        text: '历年入伍人数统计'
    		        //text: null, //设置null则不显示标题
    		    },
    		    //x轴
    		    xAxis: {
    		        title: {
    		            text: '年份'
    		        },
    		       // categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] 
    		        //categories: ['一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月']
    		       //categories: ['2018', '2017', '2016', '2015', '2014', '2013']
    		        categories: []
    		    },
    		    //y轴
    		    yAxis: {
    		        title: { text: '入伍人数' }
    		    },
    		    exporting: {  
                    enabled:false  
        		},  
    		    credits: {
    		    	//text: 'www.shenou.com',
    	             text: '',
    	         },
    		    //数据列
    		    series: [
    		    ] 
    		}; 
    		
    		console.log(oOptions.xAxis.categories);
    		//异步读取数据并加载到图表
    		function LoadSerie_Ajax() { 
    		       oChart.showLoading(); 
    		        $.ajax({  
    		            url : '${basePath}/statistics/check',
    		            type : 'POST',
    		            dataType : 'json',
    		            contentType: "application/x-www-form-urlencoded; charset=utf-8",  
    		            success : function(rntData){
    		            	//console.log(dd);
    		            	//oChart = new Highcharts.Chart(oOptions);
    		            	
    		            	 for(var i=0;i<strArrToIntArr(rntData.num2).length;i++){
     		                	oOptions.xAxis.categories.push(""+strArrToIntArr(rntData.num2)[i]);//动态加载x轴数据
     		                	//console.log(strArrToIntArr(rntData.num2)[i]);
     		                }  
    		            	 
    		            	 
    		                 var oSeries = {
    		                    name: "人数",
    		                    //data: [rntData.num1,rntData.num2]
    		                    data: strArrToIntArr(rntData.num1)
    		                 };
    		                 /* var oSeries1 = {
    	    		             name: "WEB端",
    	    		             data: strArrToIntArr(rntData.num2)           
    	    		         }; */
    		                oChart.addSeries(oSeries);

    		                //console.log(strArrToIntArr(rntData.num2)[0]);
    		                console.log(oOptions.xAxis.categories);
    		             
    		                //oChart.addSeries(oSeries1);
    		            }
    		        });
    		        
    		        oChart.hideLoading(); 
    		}
    		function strArrToIntArr(dataStrArr){
        		dataStrArr=dataStrArr.replace("[","");
        		dataStrArr=dataStrArr.replace("]","");
        		dataStrArr= dataStrArr.split(",");
        	    var dataIntArr=[];//保存转换后的整型字符串  
        	    dataStrArr.forEach(function(data,index,arr){  
        	        dataIntArr.push(+data);  
        	    }); 
        	    return dataIntArr;
        	}
    		
    		
    		$(document).ready(function(){
    		    oChart = new Highcharts.Chart(oOptions);
    		    //异步动态加载数据列
    		    LoadSerie_Ajax();
    		}); 
			
</script>
<script type="text/javascript">

$(function () {
    $('#container2').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '招聘岗位统计'
        },
        exporting: {  
            enabled:false  
		},  

	    credits: {
             //text: 'www.shenou.com',
             text: '',
             href: ''
         },
        tooltip: {
    	    pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %'
                }
            }
        },
        series: [{
            type: 'pie',
            name: 'Browser share',
            data: [
                ['技术',   45.0],
                ['通信',       26.8],
                {
                    name: '行政',
                    y: 12.8,
                    sliced: true,
                    selected: true
                },
                ['司机',    8.5],
                ['保安',     6.2],
                ['其它',   0.7]
            ]
        }]
    });
});
</script>

<script type="text/javascript">
﻿$(function () {
    // Set up the chart
    var chart3 = new Highcharts.Chart({
        chart: {
            renderTo: 'container3',
            type: 'column',
            margin: 75,
            options3d: {
                enabled: true,
                alpha: 15,
                beta: 15,
                depth: 50,
                viewDistance: 25
            }
        },
        title: {
            text: '退伍军人每年人数'
        },
        exporting: {  
            enabled:false  
		},  

	    credits: {
             //text: 'www.shenou.com',
             text: '',
             href: ''
         },
        xAxis: {
	        title: {
	            text: '年份'
	        },
	       // categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] 
	        categories: ['2009', '2010', '2011', '2012', '2013', '2014','2015', '2016', '2017']
	    },
	    
	    
	    //y轴
	    yAxis: {
	        title: { text: '退伍人数' }
	    },
	    
        exporting: {  
            enabled:false  
		},  

	    credits: {
             //text: 'www.shenou.com',
             text: '',
             href: ''
         },
        subtitle: {
           // text: 'Test options by dragging the sliders below'
        },
        plotOptions: {
            column: {
                depth: 25
            }
        },
        series: [{
        	name:'温州市',
            data: [250, 300, 500, 650, 700, 590, 360, 430, 559]
        }]
    });
    
    
    

    // Activate the sliders
    $('#R0').on('change', function(){
        chart3.options.chart.options3d.alpha = this.value;
        showValues();
        chart3.redraw(false);
    });
    $('#R1').on('change', function(){
        chart3.options.chart.options3d.beta = this.value;
        showValues();
        chart3.redraw(false);
    });

    function showValues() {
        $('#R0-value').html(chart3.options.chart.options3d.alpha);
        $('#R1-value').html(chart3.options.chart.options3d.beta);
    }
    showValues();
});
</script>
<script type="text/javascript">
$(function () {
    Highcharts.chart('container4', {
        title: {
            text: '退伍军人就业意向',
            x: -20 //center
        },
        subtitle: {
            text: '',
            x: -20
        },
        xAxis: {
            categories: ['事业单位', '机关单位', '国有企业', '私营企业']
        },
        yAxis: {
            title: {
                text: '人数'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        exporting: {  
            enabled:false  
		},  

	    credits: {
             text: '',
             href: ''
         },
        tooltip: {
            //valueSuffix: '°C'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: '人次',
            data: [45,58,67,56]
        }]
    });
});
</script>
</body>
</html>